<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>宠物邻里互助平台</title>
    <style>
        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, #FFF9C4 0%, #FFECB3 100%);
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .container {
            background-color: white;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
            padding: 40px;
            width: 400px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .container::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 6px;
            background: linear-gradient(90deg, #FFA000 0%, #FFC107 100%);
        }

        h1 {
            color: #5D4037;
            margin-bottom: 30px;
            font-size: 24px;
            font-weight: 600;
        }

        .form-group {
            margin-bottom: 24px;
            text-align: left;
            position: relative;
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: #5D4037;
            font-weight: 500;
            font-size: 14px;
        }

        input[type="text"],
        input[type="password"],
        input[type="email"] {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #FFE082;
            border-radius: 8px;
            background-color: #FFF9C4;
            font-size: 14px;
            transition: all 0.3s ease;
            box-sizing: border-box;
        }

        input[type="text"]:focus,
        input[type="password"]:focus,
        input[type="email"]:focus {
            outline: none;
            border-color: #FFA000;
            box-shadow: 0 0 0 3px rgba(255, 160, 0, 0.2);
        }

        .btn {
            background: linear-gradient(90deg, #FFA000 0%, #FF8F00 100%);
            color: white;
            border: none;
            padding: 14px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s;
            width: 100%;
            font-size: 16px;
            letter-spacing: 1px;
            margin-top: 10px;
            box-shadow: 0 4px 6px rgba(255, 160, 0, 0.2);
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(255, 160, 0, 0.3);
        }

        .btn:active {
            transform: translateY(0);
        }

        .links {
            margin-top: 25px;
            display: flex;
            justify-content: space-between;
        }

        .links a {
            color: #FFA000;
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s;
            position: relative;
            padding-bottom: 2px;
        }

        .links a:hover {
            color: #FF8F00;
        }

        .links a::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 1px;
            background-color: #FFA000;
            transition: width 0.3s;
        }

        .links a:hover::after {
            width: 100%;
        }

        .logo {
            color: #FFA000;
            font-size: 28px;
            font-weight: bold;
            margin-bottom: 30px;
            letter-spacing: 1px;
            text-shadow: 0 2px 4px rgba(255, 160, 0, 0.1);
        }

        #verifyId {
            border-radius: 6px;
            margin-top: 10px;
            border: 1px solid #FFE082;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .verify-code-group {
            margin-top: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .verify-code-group input {
            flex: 1;
            padding: 10px 12px;
        }

        .verify-code-group a {
            color: #FFA000;
            font-size: 13px;
            white-space: nowrap;
            text-decoration: none;
            transition: color 0.3s;
        }

        .verify-code-group a:hover {
            color: #FF8F00;
            text-decoration: underline;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="logo">宠物邻里互助平台</div>
    <form action="${pageContext.request.contextPath}/user/login" method="post">
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" id="username" name="loginUserName" required placeholder="请输入用户名">
        </div>

        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" id="password" name="loginPassword" required placeholder="请输入密码">

            <label style="margin-top: 15px;">验证码</label>
            <img id="verifyId" src="${pageContext.request.contextPath}/user/verifyCode" width="220" height="60">
            <div class="verify-code-group">
                <input type="text" name="verifyCode" placeholder="输入验证码">
                <a href="javascript:;"
                   onclick="document.getElementById('verifyId').src='${pageContext.request.contextPath}/user/verifyCode?'+(new Date()).getTime()">
                    换一张
                </a>
            </div>
        </div>

        <button type="submit" class="btn">登录</button>
        <div class="links">
            <a href="${pageContext.request.contextPath}/user/register">注册账号</a>
            <a href="#">忘记密码?</a>
        </div>
    </form>
</div>
</body>
</html>